# Contributor: Daniel Santana <daniel@santana.tech>
# Maintainer: Daniel Santana <daniel@santana.tech>
pkgname=libusrsctp
_pkgname=usrsctp
pkgver=0.9.3.0_git20190127
_commit=81049b90f5703b89154a7dc06cf13f9b01811e06
pkgrel=0
pkgdesc="Portable SCTP userland stack"
url="https://github.com/sctplab/usrsctp"
arch="all"
options="!check"  # No test suite.
license="BSD-3-Clause"
makedepends="automake autoconf libtool"
subpackages="$pkgname-static $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/sctplab/usrsctp/archive/$_commit.tar.gz"
builddir="$srcdir/$_pkgname-$_commit"

prepare() {
	./bootstrap
}

build() {
	export CFLAGS="$CFLAGS -Wno-error=address-of-packed-member -Wno-error=cpp"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="85017b9d250d7c9f86a3c65e36bd4613b7a4bd4d7c64a9b7f0022179b092b4487fea91b7ff6aee76dfdaaa9a11c3e26c92afc06d007899d44e53d182199f2338  libusrsctp-0.9.3.0_git20190127.tar.gz"
